Gauss-Jordan Elimination for Matrices Represented as Functions

نویسنده

  • Tobias Nipkow
چکیده

This theory provides a compact formulation of Gauss-Jordan elimination for matrices represented as functions. Its distinctive feature is succinctness. It is not meant for large computations. 1 Gauss-Jordan elimination algorithm theory Gauss-Jordan-Elim-Fun imports Main begin Matrices are functions: type-synonym ′a matrix = nat ⇒ nat ⇒ ′a In order to restrict to finite matrices, a matrix is usually combined with one or two natural numbers indicating the maximal row and column of the matrix. Gauss-Jordan elimination is parameterized with a natural number n. It indicates that the matrix A has n rows and columns. In fact, A is the augmented matrix with n+1 columns. Column n is the “right-hand side”, i.e. the constant vector b. The result is the unit matrix augmented with the solution in column n; see the correctness theorem below. fun gauss-jordan :: ( ′a::field)matrix ⇒ nat ⇒ ( ′a)matrix option where gauss-jordan A 0 = Some(A) | gauss-jordan A (Suc m) = (case dropWhile (λi . A i m = 0 ) [0 ..<Suc m] of [] ⇒ None | p # ⇒ (let Ap ′ = (λj . A p j / A p m); A ′ = (λi . if i=p then Ap ′ else (λj . A i j − A i m ∗ Ap ′ j )) in gauss-jordan (Fun.swap p m A ′) m)) Some auxiliary functions: definition solution :: ( ′a::field)matrix ⇒ nat ⇒ (nat ⇒ ′a) ⇒ bool where

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Gauss-Jordan Algorithm and Its Applications

In this contribution, we present a formalization of the well-known Gauss-Jordan algorithm. It states that any matrix over a field can be transformed by means of elementary row operations to a matrix in reduced row echelon form. The formalization is based on the Rank Nullity Theorem entry of the AFP and on the HOL-Multivariate-Analysis session of Isabelle, where matrices are represented as funct...

متن کامل

Gauss-Jordan elimination method for computing outer inverses

This paper deals with the algorithm for computing outer inverse with prescribed range and null space, based on the choice of an appropriate matrix G and Gauss–Jordan elimination of the augmented matrix [G | I]. The advantage of such algorithms is the fact that one can compute various generalized inverses using the same procedure, for different input matrices. In particular, we derive representa...

متن کامل

An Alternative Method to Gauss-Jordan Elimination: Minimizing Fraction Arithmetic

When solving systems of equations by using matrices, many teachers present a Gauss-Jordan elimination approach to row reducing matrices that can involve painfully tedious operations with fractions (which I will call the traditional method). In this essay, I present an alternative method to row reduce matrices that does not introduce additional fractions until the very last steps. The students i...

متن کامل

The asymptotic complexity of matrix reduction over finite fields

Consider an invertible n × n matrix over some field. The Gauss-Jordan elimination reduces this matrix to the identity matrix using at most n row operations and in general that many operations might be needed. In [1] the authors considered matrices in GL(n, q), the set of n × n invertible matrices in the finite field of q elements, and provided an algorithm using only row operations which perfor...

متن کامل

Extending Clause Learning SAT Solvers with Complete Parity Reasoning (extended version)

Instances of logical cryptanalysis, circuit verification, and bounded model checking can often be succinctly represented as a combined satisfiability (SAT) problem where an instance is a combination of traditional clauses and parity constraints. This paper studies how such combined problems can be efficiently solved by augmenting a modern SAT solver with an xor-reasoning module in the DPLL(XOR)...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:
  • Archive of Formal Proofs

دوره 2011  شماره 

صفحات  -

تاریخ انتشار 2011